<?php
include ("function.php");
$token = $_POST['token'];
$number = $_POST['number'];
if (empty($token))exit(json_encode(['status'=>-4,'message'=>'请输入Token！']));;
if ($number>10)exit(json_encode(['status'=>-2,'message'=>'单次刷取数量不可大于10']));
$success = 0;
$error = 0;
$url = 'https://cat-match.easygame2021.com/sheep/v1/game/game_over?rank_score=1&rank_state=1&rank_time=60&rank_role=1&skin=9&t='.$token;
for ($i=0;$i<=$number;$i++)
{
    $data = json_decode(getCurl($url),true);
    if ($data['err_code'] == 0)
    {
        $success = $success+1;
    }else
    {
        $error = $error+1;
    }
}
exit(json_encode(['status'=>1,'message'=>'数据统计:<br/>成功刷取'.$success.'次<br/>失败：'.$error.'次','data'=>$data]));